import 'package:flutter/material.dart';
import 'package:flutter_eve_plugin/constants/font_family.dart';
import 'package:flutter_eve_plugin/constants/font_weight.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/achieves/archieves_weapon_entity.dart';
import 'package:flutter_eve_plugin/utils/image_util.dart';
import 'package:flutter_eve_plugin/utils/print_util.dart';
import 'package:flutter_eve_plugin/utils/screen_util.dart';

class ArchivesAdvancedCenterArrowWidget extends StatelessWidget {
  final ArchievesWeaponEntity weaponEntity;

  const ArchivesAdvancedCenterArrowWidget({Key key, this.weaponEntity})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    bool visible = weaponEntity.nextForm == null;
    logPrint('weaponform visible $visible');
    return Offstage(
      offstage: visible,
      child:  Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Text(
                'Lv.${weaponEntity?.currentForm?.levelNeed ?? 0}',
                style: TextStyle(
                    color: Color(0xFFFFFFFF),
                    fontFamily: FontFamily.PMZD,
                    fontSize: setTextSp(12)),
              ),
              Text(
                ' 可解锁',
                style: TextStyle(
                    color: Color(0xFFFFFFFF),
                    fontFamily: FontFamily.PINGFANG,
                    fontSize: setTextSp(12),
                    fontWeight: FontWeightCustom.PF_Medium),
              )
            ],
          ),
          Image.asset(
            imageUtilYeXiu('archives/icon_archivers_advanced_arrow@3x'),
            width: setRatio(112),
            height: setRatio(23),
          )
        ],
      ),
    );
  }
}
